\(\int \sqrt {a+b \sqrt {x}} \, dx\) [2235]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [B] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 13, antiderivative size = 42 \[ \int \sqrt {a+b \sqrt {x}} \, dx=-\frac {4 a \left (a+b \sqrt {x}\right )^{3/2}}{3 b^2}+\frac {4 \left (a+b \sqrt {x}\right )^{5/2}}{5 b^2} \]

[Out]

-4/3*a*(a+b*x^(1/2))^(3/2)/b^2+4/5*(a+b*x^(1/2))^(5/2)/b^2

Rubi [A] (verified)

Time = 0.02 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.154, Rules used = {196, 45} \[ \int \sqrt {a+b \sqrt {x}} \, dx=\frac {4 \left (a+b \sqrt {x}\right )^{5/2}}{5 b^2}-\frac {4 a \left (a+b \sqrt {x}\right )^{3/2}}{3 b^2} \]

[In]

Int[Sqrt[a + b*Sqrt[x]],x]

[Out]

(-4*a*(a + b*Sqrt[x])^(3/2))/(3*b^2) + (4*(a + b*Sqrt[x])^(5/2))/(5*b^2)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 196

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(1/n - 1)*(a + b*x)^p, x], x, x^n], x] /
; FreeQ[{a, b, p}, x] && FractionQ[n] && IntegerQ[1/n]

Rubi steps \begin{align*} \text {integral}& = 2 \text {Subst}\left (\int x \sqrt {a+b x} \, dx,x,\sqrt {x}\right ) \\ & = 2 \text {Subst}\left (\int \left (-\frac {a \sqrt {a+b x}}{b}+\frac {(a+b x)^{3/2}}{b}\right ) \, dx,x,\sqrt {x}\right ) \\ & = -\frac {4 a \left (a+b \sqrt {x}\right )^{3/2}}{3 b^2}+\frac {4 \left (a+b \sqrt {x}\right )^{5/2}}{5 b^2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.03 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.95 \[ \int \sqrt {a+b \sqrt {x}} \, dx=\frac {4 \sqrt {a+b \sqrt {x}} \left (-2 a^2+a b \sqrt {x}+3 b^2 x\right )}{15 b^2} \]

[In]

Integrate[Sqrt[a + b*Sqrt[x]],x]

[Out]

(4*Sqrt[a + b*Sqrt[x]]*(-2*a^2 + a*b*Sqrt[x] + 3*b^2*x))/(15*b^2)

Maple [A] (verified)

Time = 12.68 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.71

method result size
derivativedivides \(\frac {\frac {4 \left (a +b \sqrt {x}\right )^{\frac {5}{2}}}{5}-\frac {4 a \left (a +b \sqrt {x}\right )^{\frac {3}{2}}}{3}}{b^{2}}\) \(30\)
default \(\frac {\frac {4 \left (a +b \sqrt {x}\right )^{\frac {5}{2}}}{5}-\frac {4 a \left (a +b \sqrt {x}\right )^{\frac {3}{2}}}{3}}{b^{2}}\) \(30\)

[In]

int((a+b*x^(1/2))^(1/2),x,method=_RETURNVERBOSE)

[Out]

4/b^2*(1/5*(a+b*x^(1/2))^(5/2)-1/3*a*(a+b*x^(1/2))^(3/2))

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 32, normalized size of antiderivative = 0.76 \[ \int \sqrt {a+b \sqrt {x}} \, dx=\frac {4 \, {\left (3 \, b^{2} x + a b \sqrt {x} - 2 \, a^{2}\right )} \sqrt {b \sqrt {x} + a}}{15 \, b^{2}} \]

[In]

integrate((a+b*x^(1/2))^(1/2),x, algorithm="fricas")

[Out]

4/15*(3*b^2*x + a*b*sqrt(x) - 2*a^2)*sqrt(b*sqrt(x) + a)/b^2

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (37) = 74\).

Time = 0.68 (sec) , antiderivative size = 272, normalized size of antiderivative = 6.48 \[ \int \sqrt {a+b \sqrt {x}} \, dx=- \frac {8 a^{\frac {9}{2}} x^{2} \sqrt {1 + \frac {b \sqrt {x}}{a}}}{15 a^{2} b^{2} x^{2} + 15 a b^{3} x^{\frac {5}{2}}} + \frac {8 a^{\frac {9}{2}} x^{2}}{15 a^{2} b^{2} x^{2} + 15 a b^{3} x^{\frac {5}{2}}} - \frac {4 a^{\frac {7}{2}} b x^{\frac {5}{2}} \sqrt {1 + \frac {b \sqrt {x}}{a}}}{15 a^{2} b^{2} x^{2} + 15 a b^{3} x^{\frac {5}{2}}} + \frac {8 a^{\frac {7}{2}} b x^{\frac {5}{2}}}{15 a^{2} b^{2} x^{2} + 15 a b^{3} x^{\frac {5}{2}}} + \frac {16 a^{\frac {5}{2}} b^{2} x^{3} \sqrt {1 + \frac {b \sqrt {x}}{a}}}{15 a^{2} b^{2} x^{2} + 15 a b^{3} x^{\frac {5}{2}}} + \frac {12 a^{\frac {3}{2}} b^{3} x^{\frac {7}{2}} \sqrt {1 + \frac {b \sqrt {x}}{a}}}{15 a^{2} b^{2} x^{2} + 15 a b^{3} x^{\frac {5}{2}}} \]

[In]

integrate((a+b*x**(1/2))**(1/2),x)

[Out]

-8*a**(9/2)*x**2*sqrt(1 + b*sqrt(x)/a)/(15*a**2*b**2*x**2 + 15*a*b**3*x**(5/2)) + 8*a**(9/2)*x**2/(15*a**2*b**
2*x**2 + 15*a*b**3*x**(5/2)) - 4*a**(7/2)*b*x**(5/2)*sqrt(1 + b*sqrt(x)/a)/(15*a**2*b**2*x**2 + 15*a*b**3*x**(
5/2)) + 8*a**(7/2)*b*x**(5/2)/(15*a**2*b**2*x**2 + 15*a*b**3*x**(5/2)) + 16*a**(5/2)*b**2*x**3*sqrt(1 + b*sqrt
(x)/a)/(15*a**2*b**2*x**2 + 15*a*b**3*x**(5/2)) + 12*a**(3/2)*b**3*x**(7/2)*sqrt(1 + b*sqrt(x)/a)/(15*a**2*b**
2*x**2 + 15*a*b**3*x**(5/2))

Maxima [A] (verification not implemented)

none

Time = 0.18 (sec) , antiderivative size = 30, normalized size of antiderivative = 0.71 \[ \int \sqrt {a+b \sqrt {x}} \, dx=\frac {4 \, {\left (b \sqrt {x} + a\right )}^{\frac {5}{2}}}{5 \, b^{2}} - \frac {4 \, {\left (b \sqrt {x} + a\right )}^{\frac {3}{2}} a}{3 \, b^{2}} \]

[In]

integrate((a+b*x^(1/2))^(1/2),x, algorithm="maxima")

[Out]

4/5*(b*sqrt(x) + a)^(5/2)/b^2 - 4/3*(b*sqrt(x) + a)^(3/2)*a/b^2

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 76 vs. \(2 (30) = 60\).

Time = 0.28 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.81 \[ \int \sqrt {a+b \sqrt {x}} \, dx=\frac {4 \, {\left (\frac {5 \, {\left ({\left (b \sqrt {x} + a\right )}^{\frac {3}{2}} - 3 \, \sqrt {b \sqrt {x} + a} a\right )} a}{b} + \frac {3 \, {\left (b \sqrt {x} + a\right )}^{\frac {5}{2}} - 10 \, {\left (b \sqrt {x} + a\right )}^{\frac {3}{2}} a + 15 \, \sqrt {b \sqrt {x} + a} a^{2}}{b}\right )}}{15 \, b} \]

[In]

integrate((a+b*x^(1/2))^(1/2),x, algorithm="giac")

[Out]

4/15*(5*((b*sqrt(x) + a)^(3/2) - 3*sqrt(b*sqrt(x) + a)*a)*a/b + (3*(b*sqrt(x) + a)^(5/2) - 10*(b*sqrt(x) + a)^
(3/2)*a + 15*sqrt(b*sqrt(x) + a)*a^2)/b)/b

Mupad [B] (verification not implemented)

Time = 5.83 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.88 \[ \int \sqrt {a+b \sqrt {x}} \, dx=\frac {x\,\sqrt {a+b\,\sqrt {x}}\,{{}}_2{\mathrm {F}}_1\left (-\frac {1}{2},2;\ 3;\ -\frac {b\,\sqrt {x}}{a}\right )}{\sqrt {\frac {b\,\sqrt {x}}{a}+1}} \]

[In]

int((a + b*x^(1/2))^(1/2),x)

[Out]

(x*(a + b*x^(1/2))^(1/2)*hypergeom([-1/2, 2], 3, -(b*x^(1/2))/a))/((b*x^(1/2))/a + 1)^(1/2)